home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Development / Source / Telnet 2.6.1d1 4⁄26⁄94 Folder / source / tek / tekdefs.h < prev    next >
Text File  |  1993-10-29  |  7KB  |  229 lines

  1. /*--------------------------------------------------------------------------*/
  2. /* TEKDEFS -- This file contains all of the defines, and other related         */
  3. /*         stuff for TEK, bundled up into one neat package                        */
  4. /*        First come the #defines                                                */
  5. /*--------------------------------------------------------------------------*/
  6.  
  7. #define MAXRG 4
  8. #define SPLASH_SQUARED    4    /* NCSA: sb - used by tekrgmac.c */
  9.  
  10.  
  11. /*--------------------------------------------------*/
  12. /* the next two are from tekstor.c                    */
  13. #define MINPOOL 0x0200    /* smallest allowable pool     */
  14. #define MAXPOOL 0x2000    /* largest allowable pool     */
  15.  
  16.  
  17. #define DEVNULL 0
  18. #define MAC 1
  19. #define HP 2
  20. #define MP 3
  21.  
  22. #define MAXWIND 20
  23. #define WINXMAX 4095
  24. #define WINYMAX 3139
  25. #define INXMAX 4096
  26. #define INYMAX 4096
  27.  
  28. #define NUMSIZES 6                 /* number of char sizes */
  29. #define PREDCOUNT 50
  30.  
  31. /* MORE vgtek specific stuff */
  32. #define MAXVG        20 /* maximum number of VG windows */
  33.  
  34. /* temporary states */
  35. #define HIY            0    /* waiting for various pieces of coordinates */
  36. #define EXTRA        1
  37. #define LOY            2
  38. #define HIX            3
  39. #define LOX            4
  40.  
  41. #define DONE        5    /* not waiting for coordinates */
  42. #define ENTERVEC    6    /* entering vector mode */
  43. #define CANCEL        7    /* done but don't draw a line */
  44. #define RS            8    /* RS - incremental plot mode */
  45. #define ESCOUT        9    /* when you receive an escape char after a draw command */
  46. #define CMD0        50    /* got esc, need 1st cmd letter */
  47. #define SOMEL        51    /* got esc L, need 2nd letter */
  48. #define IGNORE        52    /* ignore next char */
  49. #define SOMEM        53    /* got esc M, need 2nd letter */
  50. #define IGNORE2        54
  51. #define INTEGER        60    /* waiting for 1st integer part */
  52. #define INTEGER1    61    /* waiting for 2nd integer part */
  53. #define INTEGER2    62    /* waiting for 3rd (last) integer part */
  54. #define COLORINT    70
  55. #define GTSIZE0        75
  56. #define GTSIZE1        76
  57. #define    GTEXT        77    /* TEK4105 GraphText            17jul90dsw */
  58. #define MARKER        78    /* TEK4105 Marker select        17jul90dsw */
  59. #define    GTPATH        79    /* TEK4105 GraphText path        17jul90dsw */
  60. #define SOMET        80
  61. #define JUNKARRAY    81
  62. #define STARTDISC    82
  63. #define DISCARDING    83
  64. #define    FPATTERN    84    /* TEK4105 FillPattern            17jul90dsw */
  65. #define    GTROT        85    /* TEK4105 GraphText rotation    17jul90dsw */
  66. #define GTROT1        86
  67. #define    GTINDEX        87    /* TEK4105 GraphText color        17jul90dsw */
  68. #define PANEL        88    /* TEK4105 Begin Panel            23jul90dsw */
  69. #define    SUBPANEL    89    /* TEK4105 Begin^2 Panel        25jul90dsw */
  70. #define TERMSTAT    90    /* TEK4105 Report Term Status    24jul90dsw */
  71. #define    SOMER        91    /* TEK4105 for ViewAttributes    10jan91dsw */
  72. #define    VIEWAT        92    /* TEK4105 ViewAttributes        10jan91dsw */
  73. #define VIEWAT2        93
  74.  
  75. /* output modes */
  76. #define ALPHA        0
  77. #define DRAW        1
  78. #define MARK        3
  79. #define TEMPDRAW    101
  80. #define TEMPMOVE    102
  81. #define TEMPMARK    103
  82.  
  83. /* stroked fonts */
  84. #define CHARWIDE    51        /* total horz. size */
  85. #define CHARTALL    76        /* total vert. size */
  86. #define CHARH        10        /* horz. unit size */
  87. #define CHARV        13        /* vert. unit size */
  88.  
  89. /*--------------------------------------------------------------------------*/
  90. /* Next come the typedefs for the various tek structures                    */
  91. /*--------------------------------------------------------------------------*/
  92.  
  93. typedef struct TPOINT *pointlist;
  94.  
  95. typedef    struct TPOINT {
  96.     short        x,y;
  97.     pointlist    next;
  98. } point/*,*pointlist*/;        /* BYU LSC */
  99.  
  100. typedef struct {
  101.     short
  102.         (*newwin)(void);
  103.     char * 
  104.         (*devname)(void);
  105.     void 
  106.         (*init)(void);
  107.     short
  108.         (*gin)(short),
  109.         (*pencolor)(short, short),
  110.         (*clrscr)(short),
  111.         (*close)(short),
  112.         (*point)(short, short, short),
  113.         (*drawline)(short, short, short, short, short);
  114.     void
  115.         (*info)(short, short, short, short, short, short),
  116.         (*pagedone)(short),
  117.         (*dataline)(short, short, short), 
  118.         (*charmode)(short, short, short), 
  119.         (*gmode)(void),
  120.         (*tmode)(void),
  121.         (*showcur)(void),
  122.         (*lockcur)(void),
  123.         (*hidecur)(void),
  124.         (*bell)(short),
  125.         (*uncover)(short);
  126. } RGLINK;
  127.  
  128. static RGLINK RG[MAXRG] = {        /* BYU LSC */
  129.     RG0newwin,        RG0devname,        RG0void,        RG0returnshort,
  130.     RG0pencolor,    RG0returnshort,    RG0returnshort,    RG0point,
  131.     RG0drawline,    RG0info,        RG0oneshort,    RG0dataline,
  132.     RG0charmode,    RG0void,        RG0void,        RG0void,
  133.     RG0void,        RG0void,        RG0oneshort,    RG0oneshort,
  134.  
  135.     RGMnewwin,        RGMdevname,        RGMinit,        RGMgin,
  136.     RGMpencolor,    RGMclrscr,        RGMclose,        RGMpoint,
  137.     RGMdrawline,    RGMinfo,        RGMpagedone,    RGMdataline,
  138.     RGMcharmode,    RGMgmode,        RGMtmode,        RGMshowcur,
  139.     RGMlockcur,        RGMhidecur,        RGMbell,        RGMuncover,
  140.  
  141. #ifdef RGHP_USED
  142.     RGHPnewwin,        RGHPdevname,    RGHPinit,        donothing,
  143.     RGHPpencolor,    RGHPclrscr,        RGHPclose,        RGHPpoint,
  144.     RGHPdrawline,    RGHPinfo,        RGHPpagedone,    RGHPdataline,
  145.     RGHPcharmode,    RGHPgmode,        RGHPtmode,        RGHPshowcur,
  146.     RGHPlockcur,    RGHPhidecur,    RGHPbell,        RGHPuncover,
  147. #else
  148.     RG0newwin,        RG0devname,        RG0void,        RG0returnshort,
  149.     RG0pencolor,    RG0returnshort,    RG0returnshort,    RG0point,
  150.     RG0drawline,    RG0info,        RG0oneshort,    RG0dataline,
  151.     RG0charmode,    RG0void,        RG0void,        RG0void,
  152.     RG0void,        RG0void,        RG0oneshort,    RG0oneshort,
  153. #endif
  154.  
  155.     RGMPnewwin,        RGMPdevname,    RGMPinit,        RG0returnshort,
  156.     RGMPpencolor,    RG0returnshort,    RGMPclose,        RGMPpoint,
  157.     RGMPdrawline,    RGMPinfo,        RG0oneshort,    RGMPdataline,
  158.     RGMPcharmode,    RG0void,        RG0void,        RG0void,
  159.     RG0void,        RG0void,        RG0oneshort,    RG0oneshort
  160. };
  161.  
  162. /*--------------------------------------------------------------------------*/
  163. /* VGwintype structure -- this is the main high level TEK structure, where    */
  164. /*         everything happens                                                    */
  165. /*--------------------------------------------------------------------------*/
  166. struct VGWINTYPE {
  167.     OSType    id;    // VGWN
  168.     short    RGdevice,RGnum,theVS;
  169.     char    mode,modesave;                    /* current output mode */
  170.     char    loy,hiy,lox,hix,ex,ey;            /* current graphics coordinates */
  171.     char    nloy,nhiy,nlox,nhix,nex,ney;    /* new coordinates */
  172.     short    curx,cury;                        /* current composite coordinates */
  173.     short    savx,savy;                        /* save the panel's x,y */
  174.     short    winbot,wintop,winleft,winright,wintall,winwide; 
  175.         /* position of window in virutal space */
  176.     short    textcol;                        /* text starts in 0 or 2048 */
  177.     short    intin;                            /* integer parameter being input */
  178.     short    pencolor;                        /* current pen color */
  179.     short    fontnum,charx,chary;            /* char size */
  180.     short    count;                            /* for temporary use in special state loops */
  181.     char    TEKtype;                        /* 4105 or 4014?  added: 16jul90dsw */
  182.     char    TEKMarker;                        /* 4105 marker type 17jul90dsw */
  183.     char    TEKOutline;                        /* 4105 panel outline boolean */
  184.     short    TEKPath;                        /* 4105 GTPath */
  185.     short    TEKPattern;                        /* 4105 Panel Fill Pattern */
  186.     short    TEKIndex;                        /* 4105 GTIndex */
  187.     short    TEKRot;                            /* 4105 GTRotation */
  188.     short    TEKSize;                        /* 4105 GTSize */
  189.     short    TEKBackground;                    /* 4105 Background color */
  190.     pointlist    TEKPanel;                    /* 4105 Panel's list of points */
  191.     pointlist    current;                    /* current point in the list */
  192. };
  193.  
  194. /*--------------------------------------------------------------------------*/
  195. /* RGMwindow structure -- this is the display structure for tek stuff.  It    */
  196. /*         contains all the display specific info (location, scale, etc)        */
  197. /*--------------------------------------------------------------------------*/
  198.  
  199. struct RGMwindows {
  200. OSType
  201.     id;        // RGMW
  202. GrafPtr
  203.     wind;
  204. short 
  205.     xorigin,
  206.     yorigin,
  207.     xscale,
  208.     yscale,
  209.     vg,
  210.     vs,
  211.     inuse,
  212.     ingin;
  213. unsigned char
  214.     *name;
  215. short 
  216.     width,
  217.     height;
  218. ControlHandle
  219.     zoom,
  220.     vert,
  221.     horiz;
  222.     };
  223.     /* *RGMwind[ MAXWIND ];    *//* BYU - changed from an array of structure to an array of pointers */
  224.  
  225. typedef struct {
  226.     long    thiselnum;    /* number of currently-viewing element */
  227.     Handle    dataHandle;    /* Handle to the data */
  228.     }    TEKSTORE, *TEKSTOREP;
  229.